package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDem0 {
    public static void main(String[] args) throws IOException {
        String name="刘思甜";
        int age=38;
        String gender="女";
        String[] otherInfo={"好吃人","好玩吃鸡","好打呼噜"};
        Student lst=new Student(name,age,gender,otherInfo);
        System.out.println(lst);
        FileOutputStream fos=new FileOutputStream("student.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(lst);
        System.out.println("写出完毕");
        oos.close();

    }
}
